package Controller;

import Service.impl.SnackOrderServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class PaySnackStatusQueryServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        response.setCharacterEncoding("UTF-8");
        System.out.println("=============");
        System.out.println("=============");
        System.out.println("=============");
        System.out.println("=============");
        System.out.println("开始查询食品订单支付结果");
        String snackOrderId = request.getParameter("snackOrderId");
        String snackId = request.getParameter("snackId");
        SnackOrderServiceImpl snackOrderService=new SnackOrderServiceImpl();
        String result=snackOrderService.PaySnackStatusQuery(snackOrderId,snackId);
        ///
        response.getWriter().print(result);
    }
}
